				<!-- builders help -->
				<h2 id="building-a-kit">Building a Kit</h2>
				<p>Let's build a Kit named <em>mykit</em>, which will contain a couple of class definition files.
				<ol>
					<li>
						<p>Create a folder named <strong>mykit.wak</strong> within your <em>webappkit/</em> folder.</p>
					</li>
					<li>
						<p>Put your code files inside, let's say <strong>myclass.class.php</strong> and <strong>mychildclass.class.php</strong> which is extending it.</p>
					</li>
					<li>
						<p>Create an INI file at its root named <strong>wak.ini</strong> and edit it :</p>
						<code>[kit]
; kit-wide meta informations
version = "0.1" ; kit version. Will be used later.
desc = "This is my first kit. It will rocks !" ; a short description. Single line to be INI compliant !

[load_kits]
; kits to load before self resources, order will be preserved.
; n = "absolute kit id"
0 = "webappkit/datapath"

[load_files]
; self resources to load, order will be preserved.
; n = "relative/path/to/file"
0 = "myclass.class.php"
1 = "mychildclass.class.php"
</code>
						<p>This file describe Kit's resources and dependancies.
						Kits and files will be loaded in the order you defined.</p>
					</li>
				</ol>
				<p>Here we're done with the main kit.</p>
				<p>Optionaly we can create a script which will be ran when the subkit instance will be created : name it <strong>wak.init.php</strong>.</p>
				<p>Please note that Kits are singleton and won't be instanciated twice.</p>

			<h2 id="building-a-subkit">Building a subkit</h2>
							<p>It will also require another kit, <em>webappkit/datapath</em>, and provide an extension as an optional subkit named <em>mysubkit</em>.</p>
				<ol>
					<li>
						<p>Into <em>mykit.wak/</em>, create a folder named <strong>mysubkit.wak</strong></p>
					</li>
					<li>
						<p>Put its own code files into it, for example <strong>anotherclass.php4</strong> and <strong>anotherclass.php5</strong>, which are PHP4 and PHP5 versions of the same class.</p>
					</li>
					<li>
						<p>Create its <strong>wak.ini</strong> file at its root :</p>
						<code>[load_kits]
; kits to load before self resources, order will be preserved.
; n = "absolute kit id"
0 = "mykit"
1 = "webappkit/pathnodes"

[load_files]
; self resources to load, order will be preserved.
; n = "relative/path/to/file"
0 = "anotherclass.php*"</code>
						<p>As you see, this subkit requires its parent kit and anotherkit, <em>webappkit/pathnodes</em>.
						It also requires <em>webappkit/datapath</em>, but this dependancy is already defined by parent kit.</p>
						<p>Using * at the end of the file name will trigger the load of .php4 or .php5, upon the current running PHP version.</p>
					</li>
				</ol>
				<p>A subkit may contain itself a subkit and so on.</p>
				<h3>Subkits auto-loading</h3>
				<p>If we want the parent kit <em>mykit</em> to load its subkit when loaded itself, we can add this into <em>mykit</em>'s wak.ini file :</p>
				<code>[load_subkits]
; subkits to load after self resources, order will be preserved
; n = "relative subkit id"
0 = "mysubkit"</code>
				<p>The subkit will be loaded <strong>after</strong> paren'ts kit dependancies and own files.</p>

				<h2 id="adding-services">Adding services</h2>
				<p>Services have to be declared within kit's <em>wak.ini</em> file :</p>
				<code>[services]
; name = "class"
worker = "workerservice"

[load_files]
0 = "workerservice.class.php"</code>
				<p>Here we have declared a service wich will be named <em>worker</em> within the kit and will be an instance of the class <em>workerservice</em>.</p>
				<p>Service classes have to extends <em>wakService</em> class.
				Their definition file can be included within the providing kit or one of its dependencies.
				Here it's an included one. Let's look at its class definition :</p>
				<code>class workerService extends wakService {
	function getColor() {
		return $this->cfg['color'];
	}
	var $cfg=array('color'=>'red');
}</code>
				<p>Now, we can get service <em>worker</em> from our kit and it will have its default config :</p>
				<code>$worker=&kit->getService('worker');
/**
 * this will print 'red'
 */
echo $worker->getColor();</code>
				<p>But our <em>workerservice</em> class can now be used in another kit, by declaring it in the kit's <em>wak.ini</em> file :</p>
				<code>[services]
stuffer = "workerservice"</code>
				<p>And let's override its config. Create a file named <strong>stuffer.service.ini</strong> at the kit's root :</p>
				<code>; this is the stuffer service config file
color = "blue"</code>
				<p>Let's look at our second service instance :</p>
				<code>$stuffer=$kit->getService('stuffer');
/**
 * this will print "blue"
 */
echo $stuffer->getColor();</code>

				<h2 id="adding-storages">Adding storages</h2>
				<p>Storages are roughly specific services.
				Just like them, their definition file can be included within their providign kit, or they can just provided a config file for a service class taken from an external kit dependancy.
				Their function is to retrieve object instances stored in files within the kit.</p>
				<p>Here we will get templates from our kit, using a storage class provided by <em>webappkit/djtpl</em> template engine.</p>
				<p>Here's our kit's <em>wak.ini</em> :</p>
				<code>[load_kits]
; getting dependancies, including the storage class
0 = "webappkit/djtpl"

[services]
; declaring storage
templates = "djtplstorage"</code>
				<p>And now we override some storage config :</p>
				<code>; this is the templates storage config
search = "views/{{lang}}/{{id}}.{{type}}"
; here is the filename template for files search
[critera]
; the defaults values for search criteria
lang = "en"
type = "html"</code>
				<p>Now, let's get a template from our kit :</p>
				<code>/**
* getting storage instance from our application kit
*/
$store=$kit->getStorage('templates');
/**
 * changing a criteria's default value
 */
$store->setCriteria('lang','fr');
/**
 * getting a template
 * string criteria will be taken as 'id'
 * or you can provide an associative array for more criteria
 * missing criteria will be taken from current defaults
 * this will build a template instance from views/fr/home.html
 */
$tpl=$store->getItem('home');</code>